home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1996 September / JCSM Shareware Collection (JCS Distribution) (September 1996).ISO / writgaid / 12530a01.ziv / RMSZIP7.EXE / RMS2WPW5.WCM < prev    next >
Text File  |  1994-01-15  |  3KB  |  159 lines

  1. //**************************************************************
  2. //*  RMS2WPW5.WCM
  3. //*  This macro is used to change the pairs of Epson print
  4. //*  codes to WPW attribute code pairs.
  5. //**************************************************************
  6.  
  7. //**************************************************************
  8. //*  MAIN PROGRAM
  9. //**************************************************************
  10. Application(wp;wpwp;default)
  11. //Application (WP;WPWP;Default;"WPWPUS.WCD")
  12.  
  13. CANCELON
  14. OnCancel(End2@)
  15.  
  16. DialogDefine(100;50;50;225;115;1+2+16;"RMS-III: Attribute Conversion")
  17.  
  18. DialogAddText(100;1001;10;10;200;60;1;"WordPerfect Windows, 5.1/5.2, macro to convert Epson-type attribute/print codes to WP attributes.  These are the codes that when brought into WPW appear as {ESC}G, {ESC}-1, {ESC}4, etc.   ({ESC} may be represented by an arrow.)")
  19. DialogAddText(100;1002;10;45;200;30;1;"The process will make three loops through the file, one each for bold, underline, and italic.  The screen will not display the results until the process is complete.")
  20.  
  21. DialogDisplay(100;1)
  22. MDR:=MacroDialogResult
  23. DialogDestroy(100)
  24.  
  25. If(MDR = 2)         //If user canceled dialog
  26.     Go(End2@)
  27. EndIf
  28.  
  29.  
  30.  
  31. ONCANCEL(end2@)
  32. Display(State:Off!)
  33. PosDocTop()
  34.  
  35. ONNOTFOUND (fixbold@)
  36. LABEL(loop1@)
  37.  
  38. SearchText
  39. (
  40.    SearchString:"G";
  41.    SearchDirection:Forward!;
  42.    SearchScope:Extended!
  43. )
  44. DeleteCharPrevious()
  45. DeleteCharPrevious()
  46. SelectMode
  47. (
  48.    State:On!
  49. )
  50. SearchText
  51. (
  52.    SearchString:"H";
  53.    SearchDirection:Forward!;
  54.    SearchScope:Extended!
  55. )
  56. FontBold
  57. (
  58.    State:On!
  59. )
  60. SelectMode
  61. (
  62.    State:Off!
  63. )
  64. DeleteCharPrevious()
  65. DeleteCharPrevious()
  66.  
  67.  
  68. GO (loop1@)
  69. LABEL(fixbold@)
  70. PosDocTop()
  71.  
  72. ONNOTFOUND (fixund@)
  73. LABEL(loop2@)
  74.  
  75. SearchText
  76. (
  77.    SearchString:"-1";
  78.    SearchDirection:Forward!;
  79.    SearchScope:Extended!
  80. )
  81. DeleteCharPrevious()
  82. DeleteCharPrevious()
  83. DeleteCharPrevious()
  84. SelectMode
  85. (
  86.    State:On!
  87. )
  88. SearchText
  89. (
  90.    SearchString:"-0";
  91.    SearchDirection:Forward!;
  92.    SearchScope:Extended!
  93. )
  94. FontUnderline
  95. (
  96.    State:On!
  97. )
  98. SelectMode
  99. (
  100.    State:Off!
  101. )
  102. DeleteCharPrevious()
  103. DeleteCharPrevious()
  104. DeleteCharPrevious()
  105.  
  106. GO (loop2@)
  107. LABEL(fixund@)
  108. PosDocTop()
  109.  
  110. ONNOTFOUND (fixitalic@)
  111. LABEL(loop3@)
  112.  
  113. SearchText
  114. (
  115.    SearchString:"";
  116.    SearchDirection:Forward!;
  117.    SearchScope:Extended!
  118. )
  119. DeleteCharPrevious()
  120. DeleteCharPrevious()
  121. SelectMode
  122. (
  123.    State:On!
  124. )
  125. SearchText
  126. (
  127.    SearchString:"";
  128.    SearchDirection:Forward!;
  129.    SearchScope:Extended!
  130. )
  131. FontItalic
  132. (
  133.    State:On!
  134. )
  135. SelectMode
  136. (
  137.    State:Off!
  138. )
  139. DeleteCharPrevious()
  140. DeleteCharPrevious()
  141.  
  142. GO (loop3@)
  143. LABEL(fixitalic@)
  144. PosDocTop()
  145.  
  146. Display(State:On!)
  147.  
  148.  
  149. DialogDefine(200;50;50;100;70;1+16;"")
  150. DialogAddText(200;1002;5;5;80;30;1;"Conversion complete; return to document.")
  151. DialogDisplay(200;1)
  152. DialogDestroy(200)
  153.  
  154. LABEL(end2@)
  155.  
  156. QUIT
  157.  
  158.  
  159.